Electric motor control system with current sensor offset correction

ABSTRACT

An electric-motor-control system with current sensor offset correction includes three current-sensors and a controller. Each of the three current-sensors is used to detect current through one of three windings of a Y-connected motor. The controller is in communication with the three current-sensors. The controller records periodically measurements of sensed-current indicated by each current-sensor while variable-current flows through each of the three windings, determines an x-offset and a y-offset of a rotating-vector indicated by a plurality of the measurements, and determines an offset-current of each of the three current-sensors based on the x-offset and the y-offset.

TECHNICAL FIELD OF INVENTION

This disclosure generally relates to an electric-motor-control system,and more particularly relates to a system that records periodicallymeasurements of sensed-current indicated by three current-sensors whilevariable-current flows through each of three motor-windings, determinesan x-offset and a y-offset of a rotating-vector indicated by a pluralityof the measurements, and determines an offset-current of each of thethree current-sensors based on the x-offset and the y-offset.

BACKGROUND OF INVENTION

In AC motor control applications for electric vehicle traction drive, itis desirable to maintain torque accuracy within tight tolerance band,e.g. +/−5%. However, torque is typically not a directly measuredquantity. Instead, it is a predicted quantity, derived from measuredphase current signals, and estimated motor parameters. Therefore, havingaccurate current measurement and estimated motor parameters areadvantageous for maintaining tight torque requirement. It is known thateconomical current sensors have a DC offset bias that needs to becorrected to maintain accuracy. The correction is typically performedduring an off-state when no motor-current is flowing. However, if thereis a drift of the DC offset characteristic during operation, the driftwill go undetected and therefore uncompensated.

SUMMARY OF THE INVENTION

What is needed is a means or method in which DC offset can be detectedwhile there is free current circulation without any regulation beingapplied inside three-phase machines.

In accordance with one embodiment, an electric-motor-control system withcurrent sensor offset correction is provided. The system includes threecurrent-sensors and a controller. Each of the three current-sensors isused to detect current through one of three windings of a Y-connectedmotor. The controller is in communication with the threecurrent-sensors. The controller records periodically measurements ofsensed-current indicated by each current-sensor while variable-currentflows through each of the three windings, determines an x-offset and ay-offset of a rotating-vector indicated by a plurality of themeasurements, and determines an offset-current of each of the threecurrent-sensors based on the x-offset and the y-offset.

Further features and advantages will appear more clearly on a reading ofthe following detailed description of the preferred embodiment, which isgiven by way of non-limiting example only and with reference to theaccompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

The present invention will now be described, by way of example withreference to the accompanying drawings, in which:

FIG. 1 is a diagram of an electric-motor-control system in accordancewith one embodiment;

FIG. 2A is a conceptual illustration of a rotating current vectorwithout the effect of current sensor DC offset in accordance with oneembodiment;

FIG. 2B is a conceptual illustration of a rotating current vector thatincludes the effect of current sensor DC offset in accordance with oneembodiment;

FIG. 3 is a conceptual illustration of projecting current sensor dataonto an orthogonal frame by the system of FIG. 1 in accordance with oneembodiment;

FIG. 4 is a diagram of a controller used in the system of FIG. 1 inaccordance with one embodiment; and

FIG. 5 is a flowchart of a method used by the system of FIG. 1 inaccordance with one embodiment.

DETAILED DESCRIPTION

FIG. 1 illustrates a non-limiting example of an electric-motor-controlsystem 10, hereafter referred to as the system 10. The system 10provides for current sensor direct-current (DC) offset correction, anddoes so while current is flowing through a motor 12. The system 10includes three current-sensors 14. Each of the three current-sensors 14is used to detect current through one of three windings of the motor 12which is characterized as a Y-connected motor and is sometime referredto as an alternating-current (AC) motor. As will be recognized by thosein the art, alternating-current is used to operate the motor 12, wherethe alternating-current is typically in the form of a sinusoidalwaveform. The system 10 described herein is advantageous over priormotor control systems that are only able to determine the offset-current18, i.e. the DC offset-current, of current sensors when there is nocurrent flowing through the windings of the motor being controlled. Theadvantage is realized because it is possible that the offset-current 18of a current sensor changes over time and changes with temperature. Thesystem 10 described herein is able to monitor the offset-current 18characteristic of each of the three current-sensors 14 while the motor12 is being operated, i.e. while current is flowing through the motor12, which can cause a change in the operating temperature of the threecurrent-sensors 14.

The system 10 includes a controller 16 in communication with the threecurrent-sensors 14. The controller 16 may include a processor (notspecifically shown) such as a microprocessor or other control circuitrysuch as analog and/or digital control circuitry including an applicationspecific integrated circuit (ASIC) for processing data as should beevident to those in the art. The controller 16 may include memory (notspecifically shown), including non-volatile memory, such as electricallyerasable programmable read-only memory (EEPROM) for storing one or moreroutines, thresholds, and captured data. The one or more routines may beexecuted by the processor to perform steps for determining theoffset-current 18 characteristics of the three current-sensors 14 basedon signals received by the controller 16 from the three current-sensors14 as described herein.

In order to determine the offset-current 18 characteristics of the threecurrent-sensors 14, the controller 16 records periodically measurementsof sensed-current indicated by each current-sensor whilevariable-current flows through each of the three windings of the motor12. The controller 16 may be equipped with an analog-to-digitalconverter (A2D, FIG. 4) used to capture or sample analog-signals 22(Ia_s_an, Ib_s_an, Ic_s_an) output by the three current-sensors 14. Asused herein the term ‘records periodically’ means that a plurality ofmeasurements of the analog-signals 22 are recorded over time, typicallyat a constant or steady sampling-frequency or sampling-rate, however,this is not a requirement. As will be recognized by those in the art, itis preferable that the sampling-frequency is substantially greater thanthe drive-frequency 20. By way of example and not limitation, a suitablevalue for the drive-frequency 20 of the motor 12 is 100 Hz, and asuitable value for sampling-frequency is 1500 Hz.

Once a sufficient number of samples of the analog-signals 22 arecollected, thirteen for example (determined by empirical testing), thecontroller 16 determines an x-offset 24 (FIG. 2B) and a y-offset 26 of arotating-vector 28 indicated by the plurality of the measurements, anddetermines an offset-current 18 of each of the three current-sensors 14based on the x-offset 24 and the y-offset 26. It is noted that theorigin 32 of the rotating-vector 28 can be used to determine thex-offset 24 and the y-offset 26, and the values of the x-offset 24 andthe y-offset 26 can be used to determine the offset-current 18 for eachof the three current-sensors 14. The details of the algorithm or processor mathematical model by which the offset-current 18 for each of thethree current-sensors 14 is determined will be described in more detaillater. Once the offset-current 18 for each of the three current-sensors14 is known, then the ‘actual motor current’ for each phase or windingis determined by simply adding (or subtracting) the ‘measured motorcurrent’ (indicated by the analog-signals 22) and the offset-current 18for each of the three current-sensors 14.

It was observed that even when the offset-currents 18 are well-knownbecause they were determines in a noise-free laboratory environment, thesum of the winding-currents indicated by analog-signals 22 did notalways add up to zero, which suggested that there may be some form ofcurrent-leakage in the motor 12, and/or there may be differences in gainamong the current-sensors 14. As such, the controller may also beconfigured to determine a leakage-current 30 based on the plurality ofthe measurements, and further determine the offset-current 18 of each ofthe three current-sensors 14 based on the x-offset 24, the y-offset 26,and the leakage-current 30.

The details of the algorithm will now be described beginning with somereview. With typical alternating-current flow, the three current-sensors14 will each detect a signal that is sinusoidal in nature. Directmeasurement of DC offset from individual sensors under this situationisn't desirable, because it will require heavy filtering to removefundamental frequency. As a consequence, DC offset extraction will betoo slow. Instead of viewing problem from individual phase measurement,it was discovered that a linear combination of all phase currents inbalanced three-phase machines behave similar to a rotating currentvector (the rotating-vector 28) with magnitude I, as shown in FIGS. 2Aand 2B. Typically, the rotating-vector 28 isn't a quantity that can bedirectly measured. Instead, current measurement from phase A, B, and Care measured by the A2D. From A2D measurement, the controller 16performs signal processing to convert current measurement from A, B, andC into an orthogonal-axis (e.g. X-Y axis). From then, therotating-vector 28 can be constructed. It is noted that therotating-vector 28 has a relatively constant magnitude. If there aresubstantive values of offset-currents from individual phase currents(A-B-C), it will change the relative position of the origin 32 of therotating-vector 28, but the magnitude will stay constant, as shown inFIG. 2B. The offsets as shown in FIG. 2B are also a generally constantquantity, at least for short time intervals, less than one minute forexample. The system 10 provides a way to track current vector in FIG.2B, such that offset-current 18 for each of the three current-sensors 14can be determined.

The purpose of the FIG. 2B is to show that there is constant magnitudecurrent vector I (the rotating-vector 28) that is rotating in space, butthe origin 32 is offset by sensor DC bias. More accurate representationwhen DC offset is presence is shown in FIG. 3. As seen in the figures,there are two main reference frames, the one on the left side is machinereference frame, and the one on right side is sensor reference frames.The correct current quantity is the one viewed from machine frame. Whencurrent is viewed from sensor frame, it is biased by DC offset (dcx anddcy) from machine frame. Green lines (X-Y axis) on both frames arestationary orthogonal axis in-which individual current sensor readingfrom a-b-c axis will be projected to. By having current quantitiesrepresented in X-Y axis, will provide convenient way to manipulate thesignals.

Having described reference frames (FIG. 3) where DC current offset canbe extracted, key features of the system are now described, where thekey features include that the system 10 combines measured current signaland mathematical model to predict the offset-current 18 of each of thethree current-sensors 14, and that the system 10 can be implemented intoa real time structure.

FIG. 4 illustrates further details of the system 10, in particular thecontroller 16. Phase current from the motor 12 is converted from analogto digital data by the A2D at fixed period. Internally within controller16, currents are converted into an orthogonal frame 34 so that currentvector (Ix and Iy) can be constructed. The model will collect currentvector information until sufficient data is collected, and then DCoffset quantity will be predicted. As final step, predicted DC offsetquantity will be converted into A, B, C frame from the orthogonal frame34.

There are two additional advantages of the system 10 other than the factthat the offset-current 18 can be estimated with current flowing. First,algorithm can converge within few electrical cycles (less than 10electrical cycles). It can be further sped up if angle theta_s isupdated with additional inner iterations loop. Second, testing has shownthat in the presence of measurement noise, the algorithm can stillmaintain its convergence stability and produces decent prediction ofoffset-current 18 and current magnitude.

The signal path illustrated in FIG. 4 describes relationship betweenmeasured current in sensor and machine frame. Detail derivations of themodel are shown in Eqs. 1-18. From the model, current DC offset andmachine current magnitude can be related to measured sensor signal byEqs. 10-12. From these equations, the parameters DCx, DCy, DC0, andI_machine that can satisfy the equations can be determined. The methodor process used to search for the parameters is gradient-descent. Themethod is selected because it isn't computationally expensive. In thisapproach, signal data can be processed one at a time, and parameterprediction can be outputted once enough data are collected. Eqs. 19-28show detail derivation of gradient descent approach. A non limitingexample of a method 36 is shown in FIG. 5.

The mathematical model derivation (see a) starts from sensor referenceframe. In this reference frame, machine performs measurement of phase A,B, and C current. Then, the currents quantity can be projected intoorthogonal axis through trigonometry relation as follows:

Ix_s=⅔*(Ia _(s) −Ib_s*cos [60]−Ic_s*cos [60])  Eq. 1,

Iy_s=⅔*(Ib_s*cos [30]−Ic_s*cos [30])  Eq. 2, and

I0_s=⅔*(Ia_s+Ib_s+Ic_s)  Eq. 3,

where “_s” indicates that currents are viewed from sensor referenceframe.

Under assumption that the motor is running at steady-state speed,current quantities per phase (phase A, B, C) will be sinusoidal withconstant magnitude. However, the presence of DC offset will make peakvalue of phase current to be unsymmetrical. By referencing to FIG. 3,per phase current quantities in sensor reference frame Eq. 1-3 arerelated to machine frame by following equations:

Ia_s=I_machine·cos [theta]+DCa  Eq. 4,

Ib_s=I_machine·cos [theta−120]+DCb  Eq. 5, and

Ic_s=I_machine·cos [theta−240]+DCc  Eq. 6,

where I_machine is constant current amplitude as seen by machinereference frame.

By plugging Eqs. 4-6 into Eqs. 1-3 followed by simplification, followingresult is obtained:

Ix_s=I_machine·cos [theta]+(⅔·DCa−⅓·DCb−⅓·DCc)  Eq. 7,

Iy_s=I_machine·sin [theta]+(⅓·DCb−DCc)  Eq. 8, and

I0_s=⅔·(DCa+DCb+DCc)  Eq. 9.

For convenience, new terms DCx, DCy, and DCo are introduced such thatEqs. 7-9 can be re-written as:

Ix_s=I_machine·cos [theta]+DCx  Eq. 10,

Iy_s=I_machine·sin [theta]+DCy  Eq. 11, and

I0_s=DC0  Eq. 12,

where,

DCx==⅔·DCa−⅓·DCb−⅓·DCc  Eq. 13,

DCy=⅓·√{square root over (3)}(DCb−DCc)  Eq. 14, and

DCy=⅓·√{square root over (3)}·(DCb−DCc)  Eq. 15.

DC quantities in X-Y frame can be easily transform back into A,B,Cquantities by inverting Eqs. 13-15 as shown by Eqs. 16-18. However, forconvenience of further mathematical manipulation, conversion can bepostponed until DC current quantities are extracted in the orthogonalX-Y frame.

DC _(a) =DC _(X)+½·DC ₀  Eq. 16,

DC _(b)=−½·DC _(X)+½·√{square root over (3)}·DC _(Y)+½·DC ₀  Eq. 17, and

DC _(c)=−½·DC _(X)−½·√{square root over (3)}+½·DC ₀  Eq. 18.

By careful inspection of Eqs. 10-12, equation variables can be separatedinto known and unknown quantities. The known quantities Ix_s, Iy_s, andI0_s can be obtained from sensor measurements. These variables arelocated on left side of the equations. The unknown quantities areI_machine, DCx, DCy, DC0, and theta. DC0 can be estimated directly byEq. 9, however, for a reason that will described later DC0 will kept asan unknown for now. Another realization from Eqs. 10-12 is that most ofthe unknown quantities are constant, except theta. Therefore, regressionmodel to search for their values might be suitable candidate. Below, astrategy to solve these parameters using regression model will bedescribed.

The main idea of regression model can be summarized as follow, for agiven model with unknown parameters and their measured values, it ispreferable to predict parameters value that will minimize error betweenmodel output and its measured quantity. Measured quantities and modelparameters have been discussed above. First, it is preferable toconstruct cost-function that will allow minimization of the error to beperformed conveniently. Proposed cost-function equation is derived byperforming summation of square difference between left and right termsof Eqs. 10-12, as shown below.

$\begin{matrix}{J = {{\frac{1}{2 \cdot N}{\sum\limits_{m = 1}^{N}\left( {{{Ix\_ s}(m)} - {{I\_ machine} \cdot {\cos \left\lbrack {{theta}(m)} \right\rbrack}} - {DCx}} \right)^{2}}} + \left( {{{Iy\_ s}(m)} - {{I\_ machine} \cdot {\sin \left\lbrack {{theta}(m)} \right\rbrack}} - {DCy}} \right)^{2} + {\left( {{{I0\_ s}(m)} - {{DC}\; 0}} \right)^{2}.}}} & {{Eq}.\mspace{14mu} 19}\end{matrix}$

In Eq. 19, superscript (m) indicates m-th sample points of the data.Note, in this equation, theta(m) is treated as known quantity. It iscomputed/estimated on estimated sample point of Ix_s and Iy_s and givenprevious prediction of DCx and DCy (DCx_0 and DCy_0), by Eq. 20 below:

theta(m)=arc tan((Iy_s(m)−DCy_0)/(Ix_s(m)−DCx_0))  Eq. 20.

Theta(m) calculated from Eq. 20 will not be correct within iteration,since it is an estimated value. However, as predicted parameters areconverging theta(m) will be close to its true machine frame. DC0 ingeneral should be equal to I0_s(m) when there is no noise in themeasurement. However, solution of regression model will look overseveral sample data points then it performs average solution of theparameter. Therefore, in the presence of measurement noise, using DC0value from model estimation is better than its instantaneous value.

Parameters that will minimize cost function (Eq. 19) are solvediteratively by gradient descend method. Final solutions of the methodare described below, for each predicted parameters:

$\begin{matrix}{{{{DCx\_}1} = {{{DCx\_}0} - \frac{\partial J}{\partial{DCx}}}},} & {{Eq}.\mspace{14mu} 21} \\{{{{DCy\_}1} = {{{DCy\_}0} - \frac{\partial J}{\partial{DCy}}}},} & {{Eq}.\mspace{14mu} 22} \\{{{{DC0\_}1} = {{{DC0\_}0} - \frac{\partial J}{{\partial{DC}}\; 0}}},{and}} & {{Eq}.\mspace{14mu} 23} \\{{{{I\_ machine}\_ 1} = {{{I\_ machine}\_ 0} - \frac{\partial J}{\partial{I\_ machine}}}},} & {{Eq}.\mspace{14mu} 24}\end{matrix}$

where “_1” and “_0” in Eqs. 21-24 are to distinguish current fromprevious iteration value, respectively.

Gradient terms from Eqs. 21-24 are further derived by Eqs. 25-28:

$\begin{matrix}{{\frac{\partial J}{\partial{DCx}} = {\frac{1}{N} \cdot {\sum\limits_{m = 1}^{N}\left( {{{I\_ machine} \cdot {\cos \left\lbrack {{theta}(m)} \right\rbrack}} + {DCx} - {{Ix}(m)}} \right)}}},} & {{Eq}.\mspace{14mu} 25} \\{{\frac{\partial J}{\partial{DCy}} = {\frac{1}{N} \cdot {\sum\limits_{m = 1}^{N}\left( {{{I\_ machine} \cdot {\sin \left\lbrack {{theta}(m)} \right\rbrack}} + {DCy} - {{Iy}(m)}} \right)}}},} & {{Eq}.\mspace{14mu} 26} \\{\mspace{76mu} {{\frac{\partial J}{{\partial{DC}}\; 0} = {\frac{1}{N} \cdot {\sum\limits_{m = 1}^{N}\left( {{{DC}\; 0} - {I\; 0(m)}} \right)}}},{and}}} & {{Eq}.\mspace{14mu} 27} \\{\frac{\partial J}{\partial{I\_ machine}} = {\frac{1}{N} \cdot {\sum\limits_{m = 1}^{N}{\left( {{{I\_ machine} \cdot {\cos \left\lbrack {{theta}(m)} \right\rbrack}} + {DCx} - {{Ix}(m)}} \right) \cdot {\left. \quad{{\cos \left\lbrack {{theta}(m)} \right\rbrack} + {\left( {{{I\_ machine} \cdot {\sin \left\lbrack {{theta}(m)} \right\rbrack}} + {DCy} - {{Iy}(m)}} \right) \cdot {\sin \left\lbrack {{theta}(m)} \right\rbrack}}} \right).}}}}} & {{Eq}.\mspace{14mu} 28}\end{matrix}$

That is, Eqs. 21-28 are core functions in which DC current offset can beestimated along with current magnitude. The implementation of algorithmabove is shown by FIG. 5. As shown in the figure, computational stepsare broken down into several steps summarized. To save computationalcost in real-time application, computation is performed iteratively asfollow:

-   -   a. Gradient terms (Eq. 25-28) are computed/updated per new data        arrival instead of performing computation in a batch.    -   b. Decision logic is used to check if gradient calculations have        accumulated enough data (e.g. 1 electrical cycle of data). Only        when enough data has been accumulated, parameters update can be        performed.

Since (a) and (b) aren't necessarily occur in a same real-time step,computational cost can be minimized.

Accordingly, an electric-motor-control system (the system 10), acontroller 16 for the system 10, and a method 36 of operating the system10 is provided.

While this invention has been described in terms of the preferredembodiments thereof, it is not intended to be so limited, but ratheronly to the extent set forth in the claims that follow.

1. An electric-motor-control system with current sensor offsetcorrection, said system comprising: three current-sensors, wherein eachof the three current-sensors is configured to detect current through oneof three windings of a Y-connected motor; and a controller incommunication with the three current-sensors, wherein the controller isconfigured to: record periodically measurements of sensed-currentindicated by each current-sensor while variable-current flows througheach of the three windings; determine an x-offset and a y-offset of arotating-vector indicated by a plurality of the measurements; anddetermine an offset-current of each of the three current-sensors basedon the x-offset and the y-offset.
 2. The system in accordance with claim1, wherein the controller is further configured to: determine aleakage-current based on the plurality of the measurements; anddetermine the offset-current of each of the three current-sensors basedon the x-offset, the y-offset, and the leakage-current.